package base.chap2;

import java.util.Scanner;

/**
 * ${DESCRIPTION}
 *
 * @author luoyalan
 * @date 2018/9/11
 */
public class Rectangle {
    private double height;

    private double width;

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getArea() {
        return height * width;
    }

    public double getPerimeter() {
        return (height + width) * 2;
    }

    Rectangle() {
    }

    Rectangle(double height,double width) {
        this.height = height;
        this.width = width;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String strA = scanner.next();
        String strB = scanner.next();
        System.out.println(strA);
        System.out.println(strB);

        Rectangle rectangle = new Rectangle(Double.valueOf(strA).intValue(),Double.valueOf(strB).intValue());

        System.out.println(rectangle.getArea());
        System.out.println(rectangle.getPerimeter());
    }
}
